package com.slipper.common.controller;

import com.slipper.system.license.bo.LicenseBO;
import com.slipper.system.license.service.LicenseService;
import com.slipper.util.ResultUtil;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 授权信息表
 */
@RestController
@RequestMapping("/license")
public class LicenseController {
    @Resource
    private LicenseService licenseService;
    
    @PostMapping(value = "/queryBy")
    public String queryBy() {
        return ResultUtil.successResult(licenseService.queryBy());
    }

    @PostMapping(value = "/updateLicense")
    public String updateLicense(@RequestBody LicenseBO bo) {
        return ResultUtil.successResult(licenseService.updateLicense(bo) > 0 ? "更新成功！" : "更新失败！");
    }
}
